﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Functions/Messege/messege.master" AutoEventWireup="true" CodeBehind="Add.aspx.cs" Inherits="HRDexCapstoneProject.Functions.Messege.WebForm2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainPage" runat="server">
    <div align="center">
    <table >
    <tr>
            <td colspan="2">
                <asp:ImageButton ID="btnEdit" runat="server" Height="49px" Width="52px"  />
                <asp:ImageButton ID="btnDelete" runat="server" Height="49px" Width="52px" 
                    onclick="btnDelete_Click" />
                <asp:ImageButton ID="btnForward" runat="server" Height="49px" Width="52px" />
            </td> 
        </tr>
        <tr>
            <td>
                <asp:Panel ID="Panel1" runat="server" Visible="False">
                <table>
               
                    <tr>
                        <td ID="Title1" style="width: 85px; text-align: left; height: 26px;">
                            EmpID</td>
                        <td ID="txtTitle1" style="height: 26px">
                            <asp:TextBox ID="txtFrom" runat="server" Width="300px"></asp:TextBox>
                        </td>
                    </tr>
               
        <tr>
            <td id="Title0" style="width: 85px; text-align: left;">
                To</td>
            <td id="txtTitle0">
                <asp:DropDownList ID="ddlToSend" runat="server" DataSourceID="MessageTo" 
                    DataTextField="FullName" DataValueField="EmployeeID" Height="26px" 
                    Width="309px">
                </asp:DropDownList>
                <asp:SqlDataSource ID="MessageTo" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:HRmainConnectionString %>" 
                    SelectCommand="SELECT EmployeeID, LastName + ', ' + FirstName + ' ' + MiddleName AS FullName FROM formEmployees">
                </asp:SqlDataSource>
            </td>
        </tr>
        <tr>
            <td id="Title" style="width: 85px; text-align: left;">
                Subject</td>
            <td id="txtTitle">
                <asp:TextBox ID="txtSubject" runat="server" Width="300px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td id="AnnouncementBody" style="width: 85px; height: 64px; text-align: left;">
                Body
            </td>
            <td id="txtBody" style="height: 64px">
                <asp:TextBox ID="txtBody" runat="server" Height="91px" TextMode="MultiLine" 
                    Width="300px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td id="category" style="width: 85px; text-align: left;">
                Category
            </td>
            <td id="CBcategory">
                <asp:DropDownList ID="ddlCategory" runat="server" Height="16px" Width="306px" 
                    DataSourceID="catMessege" DataTextField="catMessegeName" 
                    DataValueField="catMessegeID">
                </asp:DropDownList>
                <asp:SqlDataSource ID="catMessege" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:HRmainConnectionString %>" 
                    SelectCommand="SELECT [catMessegeName], [catMessegeID] FROM [catMessege]">
                </asp:SqlDataSource>
            </td>
        </tr>
        <tr>
            <td style="width: 85px; text-align: left;">
                Attach File
                <td>
                    <asp:FileUpload ID="fuAttachment" runat="server" Width="306px" />
            </td>
            <tr>
                <td colspan="2">
                    <asp:Button ID="txtSubmit" runat="server" onclick="txtSubmit_Click1" 
                        Text="Save" Width="60px" />
                    <asp:Button ID="txtCancel" runat="server" Text="Cancel" />
                </td>
            </tr>
                </table>
                </asp:Panel>
                <asp:Panel ID="Panel2" runat="server">
                <table>
                     <tr>
                                <td style="width: 126px; text-align: left">EmpID</td>
                                <td style="width: 266px; text-align: left">
                                 <asp:Label ID="lblFrom" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 126px; text-align: left">
                                    To</td>
                                <td style="width: 266px; text-align: left">
                                    <asp:Label ID="lblTo" runat="server"></asp:Label>
                                </td>
                     </tr>
                            <tr>
                                <td style="width: 126px; text-align: left">Subject</td>
                                <td style="width: 266px; text-align: left">
                                    <asp:Label ID="lblSubject" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 126px; text-align: left" valign="top">Description</td>
                                <td style="width: 266px; text-align: left">
                                    <asp:Label ID="lblDescription" runat="server" Height="139px" Width="249px"></asp:Label>
                                </td>
                            </tr>
                            
                            <tr>
                                <td style="width: 126px; text-align: left">Attach</td>
                                <td style="width: 266px; text-align: left">
                                    <asp:LinkButton ID="lblAttach" runat="server" onclick="lblAttach_Click">Download</asp:LinkButton>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 126px; text-align: left">
                                    Message Type</td>
                                <td style="width: 266px; text-align: left">
                                    <asp:Label ID="lblType" runat="server"></asp:Label>
                                </td>
                     </tr>
                            <tr>
                                <td style="width: 126px; text-align: left">Published</td>
                                <td style="width: 266px; text-align: left">
                                    <asp:Label ID="lblPubDate" runat="server"></asp:Label>
                                </td>
                            </tr>
                </table>
                </asp:Panel>


            </td>
        </tr>
    </table>
</div>
</asp:Content>
